#!/bin/sh

# $Id$

RPMEVAL=./rpmeval

err=0

mcheck() {
    macro=$1
    is=$2
    echo -n "${macro}... "
    res=`$RPMEVAL macros ${macro}`
    if [ "X${res}" != "X${is}" ]; then
        echo "give ${res} not ${is}"
        err=$[ $err + 1]
    else
        echo "OK"
    fi
}

mcheck %_var /var
mcheck %_localstatedir /var/lib
mcheck %_bindir /usr/bin
mcheck %_sbindir /usr/sbin
mcheck %_prefix /usr

exit $err
